package cn.it.shop.dao.impl;

import java.util.Set;

import org.hibernate.classic.Session;
import org.springframework.stereotype.Repository;

import cn.it.shop.dao.ForderDao;
import cn.it.shop.pojo.Forder;
import cn.it.shop.pojo.Sorder;

@Repository("forderDao")
public class ForderDaoImpl extends BaseDaoImpl<Forder> implements
		ForderDao {

	@Override
	public void update(int id, int sid) {
		String hql="UPDATE Forder f SET f.status.id=:sid WHERE f.id=:id";
		Session session = sessionFactory.getCurrentSession();
		session.createQuery(hql)//
		.setInteger("id",id)//
		.setInteger("sid",sid)//
		.executeUpdate();  // 此方法可以执行 更新和删除语句
	}
	
	

}
